﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Reconciliation.Data
{
    public partial class Cpc
    {
        public static Domain.Cpc MapDataToDomain(Data.Cpc dataCpc)
        {
            Domain.Cpc domainCpc = new Reconciliation.Domain.Cpc();
            domainCpc.CpcCode = dataCpc.CpcCode;
            domainCpc.CpcID = dataCpc.CpcID;
            return domainCpc;

        }

        public static List<Domain.Cpc> GetCpcList()
        {
            ReconciliationEntities recEnt = new ReconciliationEntities();
            List<Domain.Cpc> domainCpcList = (from c in recEnt.Cpc 
                                              select new Domain.Cpc {
                                                  CpcID = c.CpcID,
                                                  CpcCode = c.CpcCode
                                              }).ToList();

            return domainCpcList;
        }

    }
}
